package com.tinem.platform.web.gateway.util;

import com.tinem.platform.module.pojo.co.GatewayHeadName;
import org.slf4j.MDC;
import org.springframework.web.server.ServerWebExchange;

public class MDCUtil {

    public static void set(ServerWebExchange exchange){
        String gateway_request_id = GatewayUtil.getReq(exchange);
        String jit = GatewayUtil.getJit(exchange);
        MDC.put(GatewayHeadName.X_PLATFORM_GATEWAY_REQUEST_ID,gateway_request_id);
        MDC.put(GatewayHeadName.X_PLATFORM_GATEWAY_CONTEXT_JTI,jit);
    }

}
